﻿<html xmlns="http://www.w3.org/1999/xhtml" class="hb-loaded">
 <head></head>
 <body>
  <link href="css/shopping.css?v=1.3.5" type="text/css" rel="stylesheet" />
  <script src="../js/jquery.js" type="text/javascript"></script>
  <script src="../js/shoppcart.js" type="text/javascript"></script>
  <title>购物车 - 订单提交成功</title> 
  <script src="../js/ma3.js" type="text/javascript"></script>
  <script type="text/javascript">

    </script> 
  <iframe src="javascript:false;" style="display: none;"></iframe> 
  <form id="aspnetForm" action="/ncart/ConfirmOrder.aspx?orderid=20150707888887&amp;process=darryring" method="post" name="aspnetForm"> 
  
   <!--全部背景--> 
   <div class="all-thing"> 
    <!--中间内容--> 
    <div class="tcmain"> 
     <!--头部--> 
     <div class="shop_top"> 
      <div class="shopt_left fl"> 
       <a title="Darry Ring" href="../home/home.html"> <img width="186" height="42" src="../images/dr.png" /> </a>
       <span>求婚钻戒领导品牌</span> 
      </div> 
      <div class="shopt_right fr">
       <span id="ctl00_ltlUname"></span>
       <a class="my_dr" href="../member/myDr.html">我的DR</a>
       <a onClick="logout()" class="tc_dr" href="javascript:void(0)">退出</a>
       <a class="help_dr" href="../help.html">帮助中心</a>
      </div> 
     </div> 
     <!--头部end--> 
     <!--导航条--> 
     <div class="shop_nav shop_nav-end" id="ctl00_showNav"></div> 
     <!--导航条end--> 
     <!--订单提交-->
     <script>
      function toPay() {
       var nu = '1';
      /* var id=2333;
       var tab=$("input[name='target']:checked").val();
       var */
       var url = 'http://localhost:8080/DiamondRing/alipay/index.jsp?id='+value1+'&tab=' + $("input[name='target']:checked").val()+"&price="+value2;
       window.open(url);


      }
      function manyValues() {
      var url = window.location.search;
      if (url.indexOf("?") != -1) {
             var str = url.substr(1);
             strs = str.split("&");
             var key = new Array(strs.length);
             var value = new Array(strs.length);
             for (i = 0; i < strs.length; i++) {
             key[i] = strs[i].split("=")[0]
             value[i] = unescape(strs[i].split("=")[1]);

       }
      }
      return value
     }
      let value1;
      let value2;
        $(function () {
           let value=manyValues();
           value1=value[0]
           value2=value[1]
           $("#num").html(value1)
           $("#price").html(formatPrice(value2))
        })
      //为价格添加逗号
      function formatPrice(price) {
       return String(price).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
      }
     </script>
     <div class="shop_of-for"> 
      <div class="shop_ofor-top"> 
       <img width="54" height="67" src="../images/right.png" />
       <h3>订单提交成功，请您尽快完成支付！</h3> 
       <h4>请您在24小时内完成付款，超过24小时后系统将自动取消订单。</h4> 
       <p class="shop_ofor-font"> <span>订单号：<span id="num">20150707888887</span> | 应付总金额：</span> <i style="font-family:微软雅黑;">￥<span id="price">10,800</span></i> <a target="_blank" href="../member/myOrder.html">查看订单&gt;&gt;</a> </p>
      </div> 
      <h2>网上支付方式</h2> 
      <!--银行--> 
      <ul class="shop_ofor-bank"> 
       <li> <input type="radio" id="bankgongshang" checked="checked" value="0005" name="target" /> <label for="bankgongshang"> <img width="160" height="43" src="../images/bank1.jpg" /> </label> </li>
       <li> <input type="radio" value="14" id="bankpingan" name="target" /> <label for="bankpingan"> <img width="160" height="43" src="../images/bank2.jpg" /> </label> </li>
       <li> <input type="radio" value="1010" id="bankjianshe" name="target" /> <label for="bankjianshe"> <img width="160" height="43" src="../images/bank3.jpg" /> </label> </li>
       <li> <input type="radio" value="43" id="banknongye" name="target" /> <label for="banknongye"> <img width="160" height="43" src="../images/bank4.jpg" /> </label> </li>
       <li> <input type="radio" value="3" id="bankzhaoshang" name="target" /> <label for="bankzhaoshang"> <img width="160" height="43" src="../images/bank5.jpg" /> </label> </li>
       <li> <input type="radio" value="67" id="bankjiaotong" name="target" /> <label for="bankjiaotong"> <img width="160" height="43" src="../images/bank6.jpg" /> </label> </li>
       <li> <input type="radio" value="84" id="bankzhongxin" name="target" /> <label for="bankzhongxin"> <img width="160" height="43" src="../images/bank7.jpg" /> </label> </li>
       <li> <input type="radio" value="60" id="bankhuaxia" name="target" /> <label for="bankhuaxia"> <img width="160" height="43" src="../images/bank8.jpg" /> </label> </li>
       <li> <input type="radio" value="1022" id="bankpufa" name="target" /> <label for="bankpufa"> <img width="160" height="43" src="../images/bank9.jpg" /> </label> </li>
       <li> <input type="radio" value="0051" id="bankdongya" name="target" /> <label for="bankdongya"> <img width="160" height="43" src="../images/bank10.jpg" /> </label> </li>
       <li> <input type="radio" value="44" id="bankguangfa" name="target" /> <label for="bankguangfa"> <img width="160" height="43" src="../images/bank11.jpg" /> </label> </li>
       <li> <input type="radio" value="33" id="bankxingye" name="target" /> <label for="bankxingye"> <img width="160" height="43" src="../images/bank12.jpg" /> </label> </li>
       <li> <input type="radio" value="28" id="bankmingsheng" name="target" /> <label for="bankmingsheng"> <img width="160" height="43" src="../images/bank13.jpg" /> </label> </li>
       <li> <input type="radio" value="85" id="bankzhongguo" name="target" /> <label for="bankzhongguo"> <img width="160" height="43" src="../images/bank14.jpg" /> </label> </li>
       <li> <input type="radio" value="74" id="bankguangda" name="target" /> <label for="bankguangda"> <img width="160" height="43" src="../images/bank15.jpg" /> </label> </li>
       <li> <input type="radio" value="59" id="bankyouzheng" name="target" /> <label for="bankyouzheng"> <img width="160" height="43" src="../images/bank16.jpg" /> </label> </li>
       <li> <input type="radio" value="8607" id="bankzaixian" name="target" /> <label for="bankzaixian"> <img width="160" height="43" src="../images/bank17.jpg" /> </label> </li>
       <li> <input type="radio" value="alipay" id="bankzhifubao" name="target" /> <label for="bankzhifubao"> <img width="160" height="43" src="../images/bank18.jpg" /> </label> </li>
      </ul> 
      <!--银行end--> 
      <!--提交按钮--> 
      <div class="shop_ofor-button"> 
       <div onClick="toPay()" class="bt3">
        <span>立即支付</span>
       </div> 
      </div> 
      <!--提交按钮end--> 
     </div> 
   
     <!--底部--> 
     <div class="cmain shop_foot"> 
      <p>Copyright &copy; 2006-2015  戴瑞珠宝 All Rights Reserved. 粤ICP备XXX号</p> 
      <p>中国互联网违法信息举报中心 | 中国公安网络110报警服务 | 本网站提供所售商品的正式发票</p> 
      <div class="shop_foot-img"> 
       <img width="776" height="55" src="../home/image/db.jpg" />
      </div> 
     </div> 
     <!--底部end--> 
    </div> 
    <!--全部背景end--> 
   </div> 
   <script type="text/javascript">
    let userName;
    let userId;
    $(function () {
     $.getJSON("http://localhost:8080/DiamondRing/UserName",function (date) {
      userId=date.userId;
      userName=date.loginName;
      if (userName.length>0){
       $("#ctl00_ltlUname").html("您好!"+userName);
      }
     })
    })

        function logout() {
            if (window.confirm('确定退出吗？')) {
             //用户退出
             $.get("http://localhost:8080/DiamondRing/OutServlet",function (data) {
              if (data>0){
               window.location.href = "http://localhost:8080/DiamondRing/home/home.html";
              }
             });
            }
        }
</script> 
  </form> 
 
 </body>
</html>